package com.citywithincity.utils.dataconvert;

import java.io.IOException;

import com.citywithincity.db.interfaces.IValueConvert;
import com.citywithincity.utils.JsonUtil;

public class StringToJson implements IValueConvert {

	@Override
	public Object convert(Object value) {
		if(value==null)return null;
		try {
			return JsonUtil.read((String)value);
		} catch (IOException e) {
			return null;
		}
	}

}
